#!/bin/bash
# this script uses petcat and x64 from the Vice emulator
cat asteroid.txt | sed 's/#.*$//g' | tr '\n ' '\t'  | sed 's/\t[0-9]/\n\0/g' | sed 's/\t//g' > temp.bas
petcat -w2 -o asteroid.prg -l 0801 -- temp.bas
rm temp.bas
petcat asteroid.prg > asteroid.bas
c1541 -format asteroid,01 d64 asteroid.d64 -attach asteroid.d64 -write asteroid.prg asteroid
x64 asteroid.prg
#x64 asteroid.d64
